/**
 * @param {HTMLElement} el
 * @param {string} styleName
 * @returns {string}
 */
export function getElementCurrentStyle(el: HTMLElement, styleName: string): string {
  if (!el || !styleName) return ''
  try {
    return el.style[styleName as keyof CSSStyleDeclaration] as string
  } catch (e) {
    return ''
  }
} 